Conversation
📝 WalkthroughWalkthroughAdds Zcash (ZEC) mainnet support guarded by a feature flag: environment variables and validators, CSP entry, CAIP constants and asset metadata, Unchained client and parser, a Zcash UTXO ChainAdapter with ZIP317 fee logic and assetId-based utxo selection, plugin registration, type updates, tests, color map/asset data, and Redux/state + typing integrations. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant App as Application
participant Plugin as Zcash Plugin
participant Adapter as ZcashChainAdapter
participant UTXO as UtxoSelect
participant Fee as ZIP317 Calculator
participant Client as Unchained Client
App->>Plugin: register() [if VITE_FEATURE_ZCASH=true]
Plugin->>Adapter: construct(http/ws providers, midgardUrl)
App->>Adapter: buildSendApiTransaction(tx)
Adapter->>UTXO: utxoSelect(input { assetId = zecAssetId, ... })
UTXO->>UTXO: route → coinSelectZcash
UTXO->>Fee: calculateZip317Fee(numInputs,numOutputs)
Fee-->>UTXO: fee
UTXO->>Client: request buildTransaction(inputs, outputs, fee)
Client-->>Adapter: transaction data
Adapter-->>App: ready tx for sign/broadcast
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (4)
🧰 Additional context used📓 Path-based instructions (4)**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
src/state/**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{js,jsx,ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/naming-conventions.mdc)
Files:
🧠 Learnings (11)📚 Learning: 2025-08-27T13:49:48.668ZApplied to files:
📚 Learning: 2025-11-24T21:20:04.979ZApplied to files:
📚 Learning: 2025-08-27T13:49:48.668ZApplied to files:
📚 Learning: 2025-11-19T22:20:25.661ZApplied to files:
📚 Learning: 2025-08-08T20:16:12.898ZApplied to files:
📚 Learning: 2025-08-08T20:27:02.203ZApplied to files:
📚 Learning: 2025-12-04T22:57:50.839ZApplied to files:
📚 Learning: 2025-08-29T18:09:45.982ZApplied to files:
📚 Learning: 2025-11-20T12:00:45.005ZApplied to files:
📚 Learning: 2025-10-07T03:44:27.350ZApplied to files:
📚 Learning: 2025-08-07T11:20:05.201ZApplied to files:
🧬 Code graph analysis (1)src/state/migrations/index.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
src/lib/coingecko/utils.ts (1)
192-213: Confirm whether Zcash Coingecko support should respect the Zcash feature flag.Adding
zecChainIdtogetCoingeckoSupportedChainIdsis structurally correct and matches the other chains. Given the PR notes that Zcash is behind a feature flag, please confirm if it’s intentional that Coingecko support is always enabled here (even when the flag is off), or if it should be gated similarly to Arbitrum Nova.If you do want it gated, one possible adjustment:
export const getCoingeckoSupportedChainIds = () => { - return [ + const { VITE_FEATURE_ZCASH, VITE_FEATURE_ARBITRUM_NOVA } = getConfig() + return [ ethChainId, @@ - suiChainId, - dogeChainId, - zecChainId, - ...(getConfig().VITE_FEATURE_ARBITRUM_NOVA ? [arbitrumNovaChainId] : []), + suiChainId, + dogeChainId, + ...(VITE_FEATURE_ZCASH ? [zecChainId] : []), + ...(VITE_FEATURE_ARBITRUM_NOVA ? [arbitrumNovaChainId] : []), ] }This keeps Zcash fully behind the existing feature flag while following the same pattern as Arbitrum Nova.
src/state/slices/portfolioSlice/utils/index.ts (1)
116-117: Consider translation key for user-facing text.The hardcoded 'Zcash' label appears to be user-facing text. Per coding guidelines, all copy/text should use translation keys rather than hardcoded strings. Consider whether this should use a translation key for internationalization support.
Additionally, if Zcash supports different account types (similar to Bitcoin's Legacy/Segwit/Segwit Native), those distinctions should be reflected in the label.
gomesalexandre
left a comment
There was a problem hiding this comment.
Retested locally:
https://jam.dev/c/8775e669-a7a9-4a9e-a0b7-02936e414da1
- can now see ZEC ✅
Note, think the issue I was having before may be related to patch conflicts re: alpha i.e should autofix once we publish hdwallet. run yarn && yarn build:packages && yarn && yarn dev many times over + full cache nuke without luck, but yarn clean somehow saved it.
-
address derived is matching Trust's ✅
-
can swap to ZEC with Near ✅ (with #11298)
- can swap from ZEC with Near ✅ (with #11298)
- Tx history is happy (see Jam above) ✅
Updates all @shapeshiftoss/hdwallet-* packages from 1.62.22-alpha.0 to 1.62.23 stable release. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Regenerated asset data and related asset index after merging develop. Updates yarn.lock and migrations index. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
gomesalexandre
left a comment
There was a problem hiding this comment.
Sanity retest: https://jam.dev/c/3642bd17-351e-4da2-9eb4-1e30af16a921
Second sanity retest after 0c0c37a: https://jam.dev/c/c31ad5d1-b518-4bae-bb7f-a730a8bb5009
And third sanity retest because why not with flag off and Ledger to emulate prod , ensuring no crash: https://jam.dev/c/b709f41b-e47d-40ec-a9af-68bc8991f18a

Description
Zcash support for send/receive with balance and transaction history (ShapeShift wallet only).
Depends on shapeshift/hdwallet#760 (published at current alpha).
Issue (if applicable)
closes #11289
Risk
Low - new chain behind feature flag
Testing
Engineering
☝️
Operations
☝️
Screenshots (if applicable)
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.